package com.csweimei.rentmanagementtreasure.http.entity;

import android.view.View;

import com.csweimei.rentmanagementtreasure.utils.ValidateUtils;
import com.google.gson.annotations.SerializedName;

import java.util.List;

public class HouseHistoryBean extends BaseResult{
    @SerializedName("data")
    private List<DataDTO> data;

    public List<DataDTO> getData() {
        return data;
    }

    public void setData(List<DataDTO> data) {
        this.data = data;
    }

    public static class DataDTO {
        @SerializedName("customID")
        private int customID;
        @SerializedName("customImg")
        private String customImg;
        @SerializedName("customName")
        private String customName;
        @SerializedName("staTime")
        private String staTime;
        @SerializedName("endTime")
        private String endTime;
        @SerializedName("status")
        private String status;

        public int getCustomID() {
            return customID;
        }

        public void setCustomID(int customID) {
            this.customID = customID;
        }

        public String getCustomImg() {
            return customImg;
        }

        public void setCustomImg(String customImg) {
            this.customImg = customImg;
        }

        public String getCustomName() {
            return customName.substring(0,1)+"老板";
        }

        public void setCustomName(String customName) {
            this.customName = customName;
        }

        public String getStaTime() {
            return ValidateUtils.getTimeFormYMD(staTime);
        }

        public void setStaTime(String staTime) {
            this.staTime = staTime;
        }

        public String getEndTime() {
            return ValidateUtils.getTimeFormYMD(endTime);
        }

        public void setEndTime(String endTime) {
            this.endTime = endTime;
        }

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public int show1(){
            if (status.equals("签约中")){
                return View.VISIBLE;
            }else {
                return View.GONE;
            }
        }

        public int show2(){
            if (status.equals("已到期")){
                return View.VISIBLE;
            }else {
                return View.GONE;
            }
        }
    }
}
